package com.idata.controller;

import com.idata.service.services.SearchHistoryService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.ResponseBody;

import java.util.List;

@Controller
public class SearchHistoryController {

    @Autowired
    private SearchHistoryService searchHistoryService;

    @PostMapping("/history")
    @ResponseBody
    private List<String> getHistories() {
        String ip = "127.0.0.1";
        return searchHistoryService.getHistories(ip);
    }
}
